﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO.Security;
using QUANLYCHAMCONG.BL.Entities.Security;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS.Security
{
    public class GROUPBUS
    {
        public GROUPBUS() { }
        public static bool Insert(GROUP gr)
        {
            GROUPDAO dao = new GROUPDAO();
            return dao.Insert(gr);
        }
        public static bool Update(GROUP gr)
        {
            GROUPDAO dao = new GROUPDAO();
            return dao.Update(gr);
        }
        public static bool Delete(GROUP gr)
        {
            GROUPDAO dao = new GROUPDAO();
            return dao.Delete(gr);
        }
        public static DataTable SelectAll()
        {
            GROUPDAO dao = new GROUPDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(GROUP gr)
        {
            GROUPDAO dao = new GROUPDAO();
            return dao.SelectByPK(gr);
        }
        public static string GetID()
        {
            GROUPDAO dao = new GROUPDAO();
            return "GR" + dao.GetID().ToString();
        }
    }
}
